package com.jinrong.mapper;/*

 */

import com.jinrong.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Mapper
public interface UserMapper {

    @Insert("insert into users (account,password) VALUES (#{account},#{password})")
    void insert(User user);

    User find(User user);

    @Select("select * from users where account=#{account}")
    User getByAccount(String account);

    @Update("update users set status=#{status} where id=#{id}")
    void updateUser(User user);
}
